import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import get from '@dfeidao/atom-web/local/get';
import nodejs from '@dfeidao/atom-web/msg/nodejs';

export default async function a010(fd: IFeidaoAiBrowserComponent) {
	// todo

	const no = get(fd, 'no');
	const no2 = get(fd, 'val') as { risk_po_name: string };
	const name = no2.risk_po_name;
	const zname = get(fd, 'zong');

	console.log("拿撒大声地==》", no);
	console.log("拿撒大声地==》", no2);
	console.log("拿撒大声地==》", name);
	console.log("拿撒大声地==》", zname);

	const res = await nodejs<{ code: number; result: string }>('risk_point/zj-000004/s003', {
		filter: {
			risk_po_type_no: no,
			risk_po_name: name,
			hidden_name: zname
		}
	});

	if (res.code === 1) {
		alert('保存成功');
		// window.location.reload();
	} else {
		alert('保存失败');
	}
}
